﻿
Imports locks

Public Class lockWrapper(Of T As {Structure, ilock})
    Private l As lock(Of T)

    Public Function held_in_thread() As Boolean
        Return l.held_in_thread()
    End Function

    Public Function held() As Boolean
        Return l.held()
    End Function

    Public Sub wait()
        l.wait()
    End Sub

    Public Sub release()
        l.release()
    End Sub

    Public Sub locked(ByVal d As void)
        l.locked(d)
    End Sub

    Public Function locked(Of OT)(ByVal d As _do(Of OT)) As OT
        Return l.locked(d)
    End Function
End Class
